abiFilters
NdkOptions - abiFilters1
2
3
4
5
6
7
8
9
10
11android {
// Similar to other properties in the defaultConfig block, you can override
// these properties for each product flavor in your build configuration.
defaultConfig {
ndk {
// Tells Gradle to build outputs for the following ABIs and package
// them into your APK.
abiFilters 'x86', 'x86_64', 'armeabi'
}
}
}
另外一种方式1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16productFlavors {
flavor1 {
ndk {
abiFilters "armeabi-v7a"
}
}
flavor2 {
ndk {
abiFilters "armeabi-v7a"
abiFilters "x86"
abiFilters "armeabi"
abiFilters "arm64-v8a"
abiFilters "x86_64"
}
}
}